$(function(){
	 //begin validate	   
	setupFormValidation("#loginFrm",{
		rules: {
			inputEmail: {
				required: true,
				email:true,
			},
			inputPassword:{
				required:true,
				minlength: 8
			}
		},
		messages: {
			inputEmail: {
				required: "电子邮箱为必填！",
				email:'电子邮件格式不正确！'
			},
			inputPassword:{
				required:'密码为必填！',
				minlength: '密码最小为8位！'
			}
			}
		});
	//end validate
	
	initAjaxForm({
		form: $("#loginFrm"),
		beforeSubmit: function(){
			return $(this).valid();
		},
		success: function(response){
			window.location.href='/account/summary';
		}
	});
})
